<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Swagger UI</title>

  <link href='css/api/typography.css' media='screen' rel='stylesheet' type='text/css'/>
  <link href='css/api/reset.css' media='screen' rel='stylesheet' type='text/css'/>
  <link href='css/api/screen.css' media='screen' rel='stylesheet' type='text/css'/>
  <link href='css/api/reset.css' media='print' rel='stylesheet' type='text/css'/>
  <link href='css/api/print.css' media='print' rel='stylesheet' type='text/css'/>

  <script src='js/vendor/jquery-2.1.3.min.js' type='text/javascript'></script>
  <script src='js/vendor/jquery.slideto.min.js' type='text/javascript'></script>
  <script src='js/vendor/jquery.wiggle.min.js' type='text/javascript'></script>
  <script src='js/vendor/jquery.ba-bbq.min.js' type='text/javascript'></script>
  <script src='js/vendor/handlebars-2.0.0.js' type='text/javascript'></script>
  <script src='js/vendor/js-yaml.min.js' type='text/javascript'></script>
  <script src='js/vendor/lodash.min.js' type='text/javascript'></script>
  <script src='js/vendor/backbone-min.js' type='text/javascript'></script>
  <script src='js/vendor/highlight.9.1.0.pack.js' type='text/javascript'></script>
  <script src='js/vendor/highlight.9.1.0.pack_extended.js' type='text/javascript'></script>
  <script src='js/vendor/jsoneditor.min.js' type='text/javascript'></script>
  <script src='js/vendor/marked.js' type='text/javascript'></script>
  <script src='js/vendor/swagger-oauth.js' type='text/javascript'></script>

  <script src='js/api/swagger-ui.js' type='text/javascript'></script>

  <!-- Some basic translations -->
  <!-- <script src='lang/translator.js' type='text/javascript'></script> -->
  <!-- <script src='lang/ru.js' type='text/javascript'></script> -->
  <!-- <script src='lang/en.js' type='text/javascript'></script> -->

  <script type="text/javascript">
    $(function () {
      var url = window.location.pathname;
      url = url.substring(0, url.lastIndexOf("/"));

      var rest_url = url + "/api/swagger.json";
      var socket_url = url + "/api/swagger-socket.json";

      hljs.configure({
        highlightSizeThreshold: 5000
      });

      // Pre load translate...
      if(window.SwaggerTranslator) {
        window.SwaggerTranslator.translate();
      }
      window.swaggerUi = new SwaggerUi({
        url: rest_url,
        dom_id: "swagger-ui-container",
        supportedSubmitMethods: ['post'],
        onComplete: function(swaggerApi, swaggerUi){
          if(window.SwaggerTranslator) {
            window.SwaggerTranslator.translate();
          }
        },
        onFailure: function(data) {
          log("Unable to Load SwaggerUI");
        },
        docExpansion: "none",
        jsonEditor: true,
        apisSorter: "alpha",
        defaultModelRendering: 'schema',
        showRequestHeaders: true,
        validatorUrl: null
      });

      window.swaggerUiSocket = new SwaggerUi({
        url: socket_url,
        dom_id: "swagger-ui-socket-container",
        supportedSubmitMethods: [],
        onComplete: function(swaggerApi, swaggerUi){
          if(window.SwaggerTranslator) {
            window.SwaggerTranslator.translate();
          }
        },
        onFailure: function(data) {
          log("Unable to Load SwaggerUI");
        },
        docExpansion: "none",
        //jsonEditor: true,
        apisSorter: "alpha",
        defaultModelRendering: 'schema',
        showRequestHeaders: true,
        validatorUrl: null
      });

      window.swaggerUi.load();
      window.swaggerUiSocket.load();

      function log() {
        if ('console' in window) {
          console.log.apply(console, arguments);
        }
      }
  });
  </script>
</head>

<body class="swagger-section">

  <div id="message-bar" class="swagger-ui-wrap" data-sw-translate>&nbsp;</div>
  <div id="swagger-ui-container" class="swagger-ui-wrap"></div>
  <br>
  <div id="swagger-ui-socket-container" class="swagger-ui-wrap"></div>

</body>
</html>
